class CreateArtworkDescriptions < ActiveRecord::Migration
  def self.up
    create_table :artwork_descriptions do |t|
      t.references :artwork
      t.text :description
      t.string :language

      t.timestamps
    end
    
    ArtworkDescription.create :artwork => Artwork.find_by_name('Tapestry'), :description => "Very beautiful piece.", :language => "English"
    ArtworkDescription.create :artwork => Artwork.find_by_name('Yarn painting'), :description => "Looking for an intricate piece to bring joy to your home?  This hand-made piece is sure to delight young and old alike.", :language => "English"
    ArtworkDescription.create :artwork => Artwork.find_by_name('Yarn painting'), :description => "¿Buscar un pedazo intrincado para traer alegría a su hogar? Este pedazo hecho a mano está seguro de encantar semejante joven y viejo.", :language => "Spanish"
    ArtworkDescription.create :artwork => Artwork.find_by_name('Test1'), :description => "Very beautiful piece.", :language => "English"
    ArtworkDescription.create :artwork => Artwork.find_by_name('Test2'), :description => "Very beautiful piece.", :language => "English"
    ArtworkDescription.create :artwork => Artwork.find_by_name('Test3'), :description => "Very beautiful piece.", :language => "English"
    ArtworkDescription.create :artwork => Artwork.find_by_name('Test4'), :description => "Very beautiful piece.", :language => "English"
    ArtworkDescription.create :artwork => Artwork.find_by_name('Test5'), :description => "Very beautiful piece.", :language => "English"
    ArtworkDescription.create :artwork => Artwork.find_by_name('Moccasins 1'), :description => "High quality moccasins", :language => "English"
  end

  def self.down
    drop_table :artwork_descriptions
  end
end